﻿using MediatR;

using Microsoft.AspNetCore.Mvc;

namespace Holla.Infrastructure.Mediator.AspNetCore
{
    public abstract class ApiControllerBase : ControllerBase
    {
        private IMediator _mediator;
        protected IMediator Mediator => _mediator ??= (IMediator)HttpContext.RequestServices.GetService(typeof(IMediator));
    }
}